package com.mine.common.core.constants;

import javax.swing.*;

/**
 * @author jalasmart
 * 2024/3/18 11:50
 */
public class Icons implements Images {
    public static JLabel makerLabel(int x, int y, ImageIcon icon) {
        return makerLabel30x30(icon, x, y, WIDTH_30, HEIGHT_30);
    }

    public static JLabel makerLabel30x30(ImageIcon icon, int x, int y, int width, int height) {
        // 该 text 会被图像覆盖
        return new JLabel("图像：标签") {{
            this.setBounds(x, y, width, height);
            // 创建图片对象
            this.setIcon(icon);
        }};
    }
}
